﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;
using BrokerBase.Lib.Product;
using BrokerBase.Lib.Product.RateFactorConverter;
using BrokerBase.Lib.Tool;

namespace BrokerBase.Lib.Product
{
    public class ProductExpander : AbstractProductExpander
    {
        //private PolicyTarget pt;
        //private double?[] allFees;
        /// <summary>
        /// 保单加载完成
        /// </summary>
        /// <param name="policy"></param>
        public override void Loaded(IPolicy policy)
        {
            IList<string[]> rowKeys = new List<string[]>();
            int personAge = policy.Target == PolicyTarget.Holder ? policy.Owner.HolderAge : policy.Owner.InsurantAge;

            for (int i = 0; i <= 105; i++)
            {
                string[] rowKey = AgeConverter.GetKeys(policy, personAge + i, RateFactorAxis.Row);
                rowKey[1] = rowKey[1] == null ? string.Empty : rowKey[1];
                rowKeys.Add(rowKey);
            }

            allFees = PolicyUtil.ge
        }



        public double?[] AllFees
        {
            get
            {

            }
        }
    }
}
